module type OrderedType
	sig
		type t
		val compare t -> t -> int
	end

module make (T:OrderedType) =
	struct
		type elem 	= T.t
		type t 		= elem list

		let empty 	= []
		let is_empty s 	= s = []
		let cardinal s 	= List.length s
		let add x 	= function
			| h::t when T.compare h x < 0 		-> h::add x t
			| h::_ as s when T.compare h x = 0 	-> s
			| l 					-> x::l
	end

